<?php
echo"<pre>";
$dbms="mysql";
$server="localhost";
$username="root";
$password="";
$dbname="account_pdo_db";
$dsn="$dbms:host=$server;dbname=$dbname";
try{
	$pdo=new PDO($dsn,$username,$password);
	echo"<p>PDO链接MySQL数据库服务器成功</p>";
	$result=$pdo->query("select * from account");
	foreach($result as $row){
		var_dump($row);
	}
	$pdo=null;
}catch(PDOException $e){
	echo "PDO连接MySQL数据库服务器失败";
	die();	
}
?>